<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>信息管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="/style/basic_layout.css" rel="stylesheet" type="text/css">
<link href="/style/common_style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/js/jquery/jquery.js"></script>
<script type="text/javascript" src="/js/plugins/jQueryForm/jQueryForm.js"></script>
<script type="text/javascript" src="/js/plugins/artDialog/jquery.artDialog.js?skin=blue"></script>
<script type="text/javascript" src="/js/commonAll.js"></script>
	<script>
		$(function () {
            //修改表单的提交方式,就是把表单的提交方式修改为ajax
            $("#editForm").ajaxForm(function (data) {
                //显示那个温馨提示框entity
                showDialog("操作成功",function () {
                    //在编辑中,在子菜单中编辑保存的时候,要调回到子菜单中,而不是父菜单中
                    location.href= "/systemMenu/list.do?parentId=${parent.id}";
                });
            });
            //因为是普通的按钮,所以要手动提交表单
            $(".but_submit").click(function () {
                $("#editForm").submit();
            });
        });
	</script>
</head>
<body>
<form id="editForm" action="/systemMenu/saveOrUpdate.do" method="post">
	<input type="hidden" name="id" value="${entity.id}">
	<div id="container">
		<div id="nav_links">
			<span style="color: #1A5CC6;">用户编辑</span>
			<div id="page_close">
				<a>
					<img src="/images/common/page_close.png" width="20" height="20" style="vertical-align: text-top;"/>
				</a>
			</div>
		</div>
		<div class="ui_content">
			<table cellspacing="0" cellpadding="0" width="100%" align="left" border="0">
				<tr>
					<td class="ui_text_rt" width="140">父菜单</td>
					<td class="ui_text_lt">
						<input value="${parent.name}" class="ui_input_txt02" readonly/>
						<%--父类不可以修改,这里可以通过隐藏域来提交id,而菜单名字不需要提交上去--%>
						<input type="hidden" name="parentMenu.id" value="${parent.id}"/>
					</td>
				</tr>
				<tr>
					<td class="ui_text_rt" width="140">菜单名称</td>
					<td class="ui_text_lt">
						<input name="name" value="${entity.name}" class="ui_input_txt02"/>
					</td>
				</tr>
				<tr>
					<td class="ui_text_rt" width="140">菜单编码</td>
					<td class="ui_text_lt">
						<input name="sn" value="${entity.name}" class="ui_input_txt02"/>
					</td>
				</tr>
				<tr>
					<td class="ui_text_rt" width="140">URL</td>
					<td class="ui_text_lt">
						<input name="url" value="${entity.sn}" class="ui_input_txt02"/>
					</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td class="ui_text_lt">
						&nbsp;<input type="button" value="确定保存" class="ui_input_btn01 but_submit"/>
						&nbsp;<input id="cancelbutton" type="button" value="重置" class="ui_input_btn01"/>
					</td>
				</tr>
			</table>
		</div>
	</div>
</form>
</body>
</html>